API Documentation
FileExplorer.h
1 // FileExplorer.h
3 //
5 
6 namespace nkWinUi
7 {
11  class FileExplorer : public Component
12  {
13  public :
14 
18  class FileFilter
19  {
20  public :
21 
22 
25 
35  FileFilter (const FileFilter& other) ;
40  } ;
41 
42  public :
43 
51  FileExplorer (MainSystem* parentSystem) ;
56 
63  void addFilter (const nkMemory::StringView& label, const nkMemory::StringView& extension) ;
70  FileFilter& getFilter (unsigned int index) ;
78  void setFilter (unsigned int index, const nkMemory::StringView& label, const nkMemory::StringView& extension) ;
79 
85  void setFollowSelfDir (bool value) ;
89  bool getFollowSelfDir () const ;
95  void setCurrentDir (const nkMemory::StringView& path) ;
100 
107  virtual nkMemory::String openDialog (bool forSave) = 0 ;
108 
112  virtual void exportIntrospection (nkExport::Node* rootNode) override ;
116  virtual void importClassFromTree (nkExport::Node* rootNode) override ;
117  } ;
118 }
nkWinUi::FileExplorer::getFollowSelfDir
bool getFollowSelfDir() const
nkWinUi::FileExplorer::setCurrentDir
void setCurrentDir(const nkMemory::StringView &path)
nkWinUi::FileExplorer::exportIntrospection
virtual void exportIntrospection(nkExport::Node *rootNode) override
nkWinUi::FileExplorer::FileFilter::~FileFilter
~FileFilter()
nkWinUi::FileExplorer::openDialog
virtual nkMemory::String openDialog(bool forSave)=0
nkWinUi::FileExplorer::FileExplorer
FileExplorer(MainSystem *parentSystem)
nkWinUi::FileExplorer::FileFilter::FileFilter
FileFilter()
nkWinUi::FileExplorer::FileFilter
Used to filter files in the interface.
Definition: FileExplorer.h:19
nkWinUi::Component
Base class for any graphical component.
Definition: Component.h:12
nkWinUi::FileExplorer::addFilter
void addFilter(const nkMemory::StringView &label, const nkMemory::StringView &extension)
nkWinUi::FileExplorer::getFilter
FileFilter & getFilter(unsigned int index)
nkWinUi::FileExplorer
A graphical file explorer.
Definition: FileExplorer.h:12
nkWinUi::FileExplorer::setFilter
void setFilter(unsigned int index, const nkMemory::StringView &label, const nkMemory::StringView &extension)
nkExport::Node
A node in the tree structure representing the data to export / import.
Definition: Node.h:42
nkWinUi::MainSystem
The main system of the component.
Definition: MainSystem.h:18
nkWinUi::FileExplorer::FileFilter::_label
nkMemory::String _label
The label shown for the filter in the interface.
Definition: FileExplorer.h:23
nkMemory::String
Class holding information about a string, with ownership over the data.
Definition: String.h:22
nkWinUi::FileExplorer::getCurrentDir
nkMemory::StringView getCurrentDir() const
nkMemory::StringView
Class holding information about a string, with no ownership over the data.
Definition: StringView.h:22
nkWinUi::FileExplorer::importClassFromTree
virtual void importClassFromTree(nkExport::Node *rootNode) override
nkWinUi::FileExplorer::FileFilter::_extension
nkMemory::String _extension
The extensions filtered by the filter.
Definition: FileExplorer.h:24
nkWinUi::FileExplorer::~FileExplorer
~FileExplorer()
nkWinUi::FileExplorer::setFollowSelfDir
void setFollowSelfDir(bool value)
nkWinUi
Encompasses all API of component NilkinsWinUi.
Definition: Clipboard.h:7
nkWinUi::FileExplorer::FileFilter::FileFilter
FileFilter(const FileFilter &other)